<!--
  @author duanzuocai
  @since 2018/10/23 15:12
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>
<body>

<div class="layui-fluid">

    <div class="layui-card">

        <div class="layui-card-body">

            <!--表单样式统一为layui-form(必需样式)，lay-filter属性统一定义为zmn-form-->
            <form method="POST" action="" class="layui-form" lay-filter="zmn-form">

                <div style="margin-left: -30px">
                    <div class="layui-form-item">
                        <label class="layui-form-label">当前城市：</label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                <span th:text="${cityName}">cityName</span>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">影响价格：</label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                <span th:text="${priceType == 1 ? '销售价': '内部价'}">cityName</span>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">默认系数：</label>
                        <div class="layui-input-inline" style="width:190px;">
                            <input style="width: 190px;text-align: right" type="text" name="ratio" th:value="${cityRatio.toBeEffectiveRatio == null ? cityRatio.ratio : cityRatio.toBeEffectiveRatio}" autocomplete="off" class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-form-item" th:if="${bizType==1}">
                        <label class="layui-form-label">计价器3.0系数：</label>
                        <div class="layui-input-inline" style="width:190px;">
                            <input style="width: 190px;text-align: right" type="text" name="meterRatio" th:value="${meterRatio}" autocomplete="off" class="layui-input"/>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">生效日期：</label>
                        <div class="layui-input-inline">
                            <input type="text" id="effectiveDate" name="effectiveDate" placeholder="yyyy-MM-dd" class="layui-input"
                                   autocomplete="off" readonly/>
                        </div>
                        <div class="layui-input-inline">
                            <label style="color: #9F9F9F;width: 400px">生效日期选择后，配置的数据将在该日期的0点生效，不填则默认次日0：00生效 </label>
                        </div>
                    </div>
                </div>

                <div class="layui-split">&nbsp;</div>
                <div class="layui-split">&nbsp;</div>
                <div class="layui-split">&nbsp;</div>
                <div class="layui-split">&nbsp;</div>
                <div class="layui-split">&nbsp;</div>
                <div class="layui-split">&nbsp;</div>
                <div class="layui-split">&nbsp;</div>

                <!--按钮栏
                    置于form标签内的最下方，
                    主功能按钮使用默认样式，次要功能按钮使用原始按钮(加入样式layui-btn-primary)
                    -->
                <div class="layui-form-item submit">
                    <div style="text-align: center">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交</button>
                        <a class="layui-btn layui-btn-primary" onclick="zmnLayUtil.closeThisIframe(parent)">取消</a>
                    </div>
                </div>
            </form>
        </div>
    </div>

</div>
</body>
</html>

<script type="text/javascript" th:inline="javascript">
    var json = {
        cityId: [[${cityId}]],
        provinceId: [[${provinceId}]],
        channelId: [[${channelId}]],
        bizType: [[${bizType}]],
        priceType: [[${priceType}]]
    };
    layui.config({
        base: "/static/lay/",
        version: 20200312
    }).extend({
        index: "lib/index",
        channel_city_price_ratio_edit: "channel/citypriceratio/zmn.plat.citypriceratio.edit",
    }).use(['index', 'channel_city_price_ratio_edit']);

</script>